﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BugTracker.WebUX.WebCode
{
    public class BTSession
    {
        public static byte[] Image
        {
            get { return (byte[])HttpContext.Current.Session[BTHttpApplication.Constants.PREVIEW_IMG_KEY]; }
            set { HttpContext.Current.Session[BTHttpApplication.Constants.PREVIEW_IMG_KEY] = value; }
        }

        public static HttpPostedFile PostedFile
        {
            get { return (HttpPostedFile)HttpContext.Current.Session[BTHttpApplication.Constants.POSTED_FILE_KEY]; }
            set { HttpContext.Current.Session[BTHttpApplication.Constants.POSTED_FILE_KEY] = value; }
        }

        public static int? ProjectID
        {
            get { return (int?)HttpContext.Current.Session[BTHttpApplication.Constants.PROJECT_KEY] ?? 0; }
            set { HttpContext.Current.Session[BTHttpApplication.Constants.PROJECT_KEY] = value; }
        }
    }
}